home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
pascal
/
allfil.zip
/
GETKEYS.LIB
< prev
next >
Wrap
Text File
|
1986-03-09
|
764b
|
24 lines
{@@@@@@@@@@@ copyright (C) 1984 by Neil J. Rubenking @@@@@@@@@@@@@@@@@@@@@@@@
The purchaser of these procedures and functions may include them in COMPILED
programs freely, but may not sell or give away the source text.
The procedure GetKeys waits for a key to be pressed. If the key
was an ordinary one, its value is returned in "choice" and chr(0)
in "EscChoice". If the key was a "special" key, chr(27) (= ESC) is
returned in "choice" and a code in EscChoice.
The file KEYCHART.DAT gives the codes for the "special" keys.
}
PROCEDURE GetKeys(VAR choice, EscChoice : Char);
BEGIN
EscChoice := Chr(0);
REPEAT UNTIL KeyPressed;
Read(Kbd, Choice);
IF KeyPressed THEN Read(Kbd, EscChoice);
END;